package com.atguigu.jxc.controller;

import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.entity.CustomerReturnList;
import com.atguigu.jxc.service.CustomerReturnListGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/customerReturnListGoods")
public class CustomerReturnListGoodsController {

    @Autowired
    public CustomerReturnListGoodsService customerReturnListGoodsService;

    /**
     * 客户退货统计（可根据 商品类别、商品编码或名称 条件查询）
     * http://localhost:8080/customerReturnListGoods/count
     * @param sTime
     * @param eTime
     * @param goodsTypeId
     * @param codeOrName
     * @return
     */
    @PostMapping("count")
    public String count(String sTime, String eTime ,Integer goodsTypeId, String codeOrName) {
        return customerReturnListGoodsService.count(sTime, eTime, goodsTypeId, codeOrName);
    }
    @PostMapping("/customerReturnListGoods/save")
    public ServiceVO save(CustomerReturnList customerReturnList, String customerReturnListGoodsStr){

        return customerReturnListGoodsService.save(customerReturnList,customerReturnListGoodsStr);
    }


}
